home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / amos / AMOSList-0998.lzh / AMOSLIST / 000025_bounce-amos-li…net@onelist.com_Wed Sep 2 05:27:35 1998.msg < prev    next >
Text File  |  1998-10-01  |  8KB  |  191 lines

  1. >From bounce-amos-list--884-mcox=access.digex.net@onelist.com  Wed Sep  2 05:27:35 1998
  2. Received: from onelist.com (pop.onelist.com [209.207.135.253])
  3.     by pony-1.mail.digex.net (8.8.8/8.8.8) with SMTP id FAA05917
  4.     for <mcox@access.digex.net>; Wed, 2 Sep 1998 05:27:35 -0400 (EDT)
  5. Received: (qmail 31743 invoked by alias); 2 Sep 1998 09:25:08 -0000
  6. Received: (qmail 31736 invoked from network); 2 Sep 1998 09:25:06 -0000
  7. Received: from unknown (HELO neodymium.btinternet.com) (194.73.73.83) by pop.onelist.com with SMTP; 2 Sep 1998 09:25:06 -0000
  8. Received: from np5gt [195.99.56.103]  by neodymium.btinternet.com with smtp (Exim 1.70 #1) id 0zE9BF-0002qS-00; Wed, 2 Sep 1998 10:26:21 +0100
  9. Message-ID: <004b01bdd653$ceb46380$673863c3@np5gt>
  10. From: "John Glanville" <John.Glanville@btinternet.com>
  11. To: <amos-list@onelist.com>
  12. Date: Wed, 2 Sep 1998 10:26:44 +0100
  13. X-Priority: 3
  14. X-MSMail-Priority: Normal
  15. X-Mailer: Microsoft Outlook Express 4.72.3110.1
  16. X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
  17. Mailing-List: list amos-list@onelist.com; contact http://www.onelist.com
  18. Delivered-To: mailing list amos-list@onelist.com
  19. Precedence: bulk
  20. Reply-to: amos-list@onelist.com
  21. Mime-Version: 1.0
  22. Content-Type: multipart/alternative; boundary="----=_NextPart_000_0048_01BDD65C.2E814140"
  23. Subject: [amos-list] DMA... Its all in the Bitplanes! 4 graphics Ne way
  24. Status: O
  25. X-Status: 
  26.  
  27. From: "John Glanville" <John.Glanville@btinternet.com>
  28.  
  29. This is a multi-part message in MIME format.
  30.  
  31. ------=_NextPart_000_0048_01BDD65C.2E814140
  32. Content-Type: text/plain;
  33.     charset="iso-8859-1"
  34. Content-Transfer-Encoding: quoted-printable
  35.  
  36. DMA Can Be usefull but it also can be slow.... say for instance u wanted =
  37. 2 Use a tint effect in a game or something... Okay sure U could Use =
  38. point.... read in all the pixels... then change their colour accordingly =
  39. 2 the tinted colours in your pallete! Then again you must have a vastly =
  40. Excellerated Computer!!!!!!! So Instead U could Use DMA.... If U know =
  41. how Screens and Bitplanes work its easy from here.....
  42.  
  43. Screens work by layers of bits... take a 64 colour screen... it has 6 =
  44. bitplanes 2 keep under control...
  45. this is why the more colours U have when doin graphics the slower things =
  46. can be.... All of the first 4 bits, if they all =3D1 then the number =
  47. produced from 11110 is 31 meaning colour 31... so if U turn the last bit =
  48. 2 a one U are infact adding 32 2 the original 31 coz Binary works like =
  49. this
  50.  
  51. 1 2 4 8 16 32 64 128 256
  52. 1 1 1 1  1  0
  53.  
  54. Col=3D1+2+4+8+16
  55. Col=3D31
  56.  
  57. and what happens if u add 32 to a number lower than 32 in a EHB palette? =
  58. Any guesses!!!
  59. You change the colour 2 Half Brite....
  60. So if U were 2 make a prog 2 just change the bits at bitplane 5 on a 64 =
  61. colour screen you would get darkening effects.....
  62.  
  63. But just wait till u use it with 256 cols on a public screen!! HEY HEY! =
  64. Thats fun!
  65. Here is a bit of code 2 change the bits on a screen from your =
  66. coords.....
  67. Don't Let anything go out side the confines of You screen especially on =
  68. the Y axis
  69. coz what You R seeing is memory on your screen so if You poke past the =
  70. set memory 4 Your screen U R likeley to crash!!!!
  71. Use a clipping procedure or like i have 4 the mouse.
  72. Limit Mouse 128,42 To 320+127,255+41
  73. L0=3DLogbase(0)                                        ;This can change =
  74. depends on what U want 2 do!
  75. Do=20
  76.    MX=3DX Screen(X Mouse)
  77.    MY=3DY Screen(Y Mouse)
  78.    PX=3DMX/8
  79.    AX=3DMX-(PX*8)
  80.    Bset(7-AX),L0+(MY*40)+PX                            ;All ways make =
  81. sure that L0 is at a logbase though..
  82. Loop=20
  83.  
  84. You could also use copy or fill on the screen 2 get large chunks of =
  85. Bitplanes changed.....
  86. Also if You want shapes just open another screen with 2 colours ( 1 =
  87. bitplane )
  88. draw the shape then grab that pitplane and paste it 2 where U want.. or =
  89. U could Use a BOB system!
  90.  
  91. ------=_NextPart_000_0048_01BDD65C.2E814140
  92. Content-Type: text/html;
  93.     charset="iso-8859-1"
  94. Content-Transfer-Encoding: quoted-printable
  95.  
  96. <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
  97. <HTML>
  98. <HEAD>
  99.  
  100. <META content=3Dtext/html;charset=3Diso-8859-1 =
  101. http-equiv=3DContent-Type>
  102. <META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
  103. </HEAD>
  104. <BODY bgColor=3D#ffffff>
  105. <DIV><FONT color=3D#000000 size=3D2>DMA Can Be usefull but it also can =
  106. be slow....=20
  107. say for instance u wanted 2 Use a tint effect in a game or something... =
  108. Okay=20
  109. sure U could Use point.... read in all the pixels... then change their =
  110. colour=20
  111. accordingly 2 the tinted colours in your pallete! Then again you must =
  112. have a=20
  113. vastly Excellerated Computer!!!!!!! So Instead U could Use DMA.... If U =
  114. know how=20
  115. Screens and Bitplanes work its easy from here.....</FONT></DIV>
  116. <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
  117. <DIV><FONT color=3D#000000 size=3D2>Screens work by layers of bits... =
  118. take a 64=20
  119. colour screen... it has 6 bitplanes 2 keep under control...</FONT></DIV>
  120. <DIV><FONT color=3D#000000 size=3D2>this is why the more colours U have =
  121. when doin=20
  122. graphics the slower things can be.... All of the first 4 bits, if they =
  123. all =3D1=20
  124. then the number produced from 11110 is 31 meaning colour 31... so if U =
  125. turn the=20
  126. last bit 2 a one U are infact adding 32 2 the original 31 coz Binary =
  127. works like=20
  128. this</FONT></DIV>
  129. <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
  130. <DIV><FONT color=3D#000000 size=3D2>1 2 4 8 16 32 64 128 =
  131. 256</FONT></DIV>
  132. <DIV><FONT color=3D#000000 size=3D2>1 1 1 1  1  0</FONT></DIV>
  133. <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
  134. <DIV><FONT color=3D#000000 size=3D2>Col=3D1+2+4+8+16</FONT></DIV>
  135. <DIV><FONT color=3D#000000 size=3D2>Col=3D31</FONT></DIV>
  136. <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
  137. <DIV><FONT color=3D#000000 size=3D2>and what happens if u add 32 to a =
  138. number lower=20
  139. than 32 in a EHB palette? Any guesses!!!</FONT></DIV>
  140. <DIV><FONT color=3D#000000 size=3D2>You change the colour 2 Half=20
  141. Brite....</FONT></DIV>
  142. <DIV><FONT color=3D#000000 size=3D2>So if U were 2 make a prog 2 just =
  143. change the=20
  144. bits at bitplane 5 on a 64 colour screen you would get darkening=20
  145. effects.....</FONT></DIV>
  146. <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
  147. <DIV><FONT color=3D#000000 size=3D2>But just wait till u use it with 256 =
  148. cols on a=20
  149. public screen!! HEY HEY! Thats fun!</FONT></DIV>
  150. <DIV><FONT color=3D#000000 size=3D2>Here is a bit of code 2 change the =
  151. bits on a=20
  152. screen from your coords.....</FONT></DIV>
  153. <DIV><FONT color=3D#000000 size=3D2>Don't Let anything go out side the =
  154. confines of=20
  155. You screen especially on the Y axis</FONT></DIV>
  156. <DIV><FONT color=3D#000000 size=3D2></FONT><FONT size=3D2>coz what You R =
  157. seeing is=20
  158. memory on your screen so if You poke past the set memory 4 Your screen U =
  159. R=20
  160. likeley to crash!!!!</FONT></DIV>
  161. <DIV><FONT size=3D2>Use a clipping procedure or like i have 4 the=20
  162. mouse.</FONT></DIV>
  163. <DIV><FONT color=3D#000000 size=3D2>Limit Mouse 128,42 To=20
  164. 320+127,255+41<BR>L0=3DLogbase(0)      &nbs=
  165. p;            =
  166. ;            =
  167.         =20
  168. ;This can change depends on what</FONT><FONT color=3D#000000 size=3D2> U =
  169. want 2=20
  170. do!<BR>Do <BR>   MX=3DX Screen(X Mouse)<BR>   MY=3DY =
  171. Screen(Y=20
  172. Mouse)<BR>   PX=3DMX/8<BR>   =
  173. AX=3DMX-(PX*8)<BR>  =20
  174. Bset(7-AX),L0+(MY*40)+PX        &=
  175. nbsp;           &n=
  176. bsp;      =20
  177. ;All ways make sure that L0 is at a logbase though..<BR>Loop =
  178. <BR></FONT></DIV>
  179. <DIV><FONT color=3D#000000 size=3D2>You could also use copy or fill on =
  180. the screen 2=20
  181. get large chunks of Bitplanes changed.....</FONT></DIV>
  182. <DIV><FONT color=3D#000000 size=3D2>Also if You want shapes just open =
  183. another screen=20
  184. with 2 colours ( 1 bitplane )</FONT></DIV>
  185. <DIV><FONT color=3D#000